import React from 'react';

import cs from './FormBlock.module.scss';

type Props = {
  htmlFor: string;
  name: string;
};

export const FormBlock = ({ children, name, htmlFor }: React.PropsWithChildren<Props>) => (
  <div className={cs.formBlock}>
    <label className={cs.blockTitle} htmlFor={htmlFor}>
      {name}{' '}
    </label>
    {children}
  </div>
);
